//
//  StatusNormalCell.m
//  OCMicroBlog
//
//  Created by 002 on 15/11/8.
//  Copyright © 2015年 002. All rights reserved.
//

#import "StatusNormalCell.h"
#import "masonry.h"

@implementation StatusNormalCell

/**
 *  设置微博视图模型
 *
 *  @param viewModel 微博视图模型
 */
- (void)setViewModel:(StatusViewModel *)viewModel {
    
    [super setViewModel:viewModel];
    
    [self.pictureView mas_updateConstraints:^(MASConstraintMaker *make) {
        
        CGFloat offset = viewModel.thumbnailUrls.count > 0 ? StatusCellMagrin : 0;
        make.top.equalTo(self.contentLabel.mas_bottom).offset(offset);
    }];
}

/**
 *  设置界面
 */
- (void)setupUI {
    
    [super setupUI];
    
    [self.pictureView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentLabel.mas_bottom).offset(StatusCellMagrin);
        make.left.equalTo(self.contentView.mas_left);
        make.width.equalTo(@300);
        make.height.equalTo(@90);
    }];
}

@end
